package com.example.demo.controller;

import com.example.demo.entity.ThreadPoolProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ConfigPropertiesController
 * @Author bsy
 * @Description 测试ConfigurationProperties 注解
 * @Date 2022/9/2 7:31
 * @Version 1.0
 */
@RestController
public class ConfigPropertiesController {

    @Autowired
    ThreadPoolProperties  threadPoolProperties;

    @GetMapping("/config/properties")
    public String properties(){
        System.out.println("核心线程数："+ threadPoolProperties.getCorePoolSize());
        return "success";
    }
}
